#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int a[33] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
				 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
				 31, 32};

int main_add()
{
  /*4005fc:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400600:	910003fd 	mov	x29, sp
  400604:	b9001bbf 	str	wzr, [x29, #24]
  400608:	b9001fbf 	str	wzr, [x29, #28]*/
	int j = 0;
	int i = 0;

  /*40060c:	14000031 	b	4006d0 <main_add+0xd4>
  400610:	b9401ba0 	ldr	w0, [x29, #24]	// w0 = j
  400614:	11000400 	add	w0, w0, #0x1	// j++
  400618:	b9001ba0 	str	w0, [x29, #24]	// [x29+24] = 1
  40061c:	b9401ba0 	ldr	w0, [x29, #24]	// w0 = 1
  400620:	51000401 	sub	w1, w0, #0x1	// w1 = 1 - 1 = 0;
  400624:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400628:	9100c000 	add	x0, x0, #0x30	// x0 = 0x411030
  40062c:	93407c21 	sxtw	x1, w1		// x1 = 0
  400630:	b8617801 	ldr	w1, [x0, x1, lsl #2]	// w1 = [0x411030+0<<2]
  400634:	90000000 	adrp	x0, 400000 <_init-0x480>
  400638:	9128a000 	add	x0, x0, #0xa28	// x0 = 400a28
  40063c:	2a0103e3 	mov	w3, w1			// w3 = [0x411030+0<<2]
  400640:	b9401ba2 	ldr	w2, [x29, #24]	// w2 = 1
  400644:	52800201 	mov	w1, #0x10                  	// #16	// w1 = 0x10
  400648:	97ffffaa 	bl	4004f0 <printf@plt>	// printf(" %d %d\n", 0x10, 1);

  40064c:	b9401ba0 	ldr	w0, [x29, #24]	// 1
  400650:	11000400 	add	w0, w0, #0x1	// 1++
  400654:	b9001ba0 	str	w0, [x29, #24]	// [x29+24] = 2
  400658:	b9401ba0 	ldr	w0, [x29, #24]
  40065c:	51000401 	sub	w1, w0, #0x1	// w1 = 2 - 1 = 1
  400660:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400664:	9100c000 	add	x0, x0, #0x30	// x0 = 0x411030
  400668:	93407c21 	sxtw	x1, w1
  40066c:	b8617801 	ldr	w1, [x0, x1, lsl #2]	// w1 = [0x411030+1<<2]
  400670:	90000000 	adrp	x0, 400000 <_init-0x480>
  400674:	9128a000 	add	x0, x0, #0xa28		// x0 = 400a28
  400678:	2a0103e3 	mov	w3, w1				// w3 = [0x411030+1<<2]
  40067c:	b9401ba2 	ldr	w2, [x29, #24]		// w2 = 2
  400680:	52800241 	mov	w1, #0x12                  	// #18	// w1=18
  400684:	97ffff9b 	bl	4004f0 <printf@plt>	// printf("%d %d\n", 18, 2);

  400688:	b9401ba0 	ldr	w0, [x29, #24]	// 2
  40068c:	11000400 	add	w0, w0, #0x1	// 2++
  400690:	b9001ba0 	str	w0, [x29, #24]	// [x29+24] = 3	
  400694:	b9401ba0 	ldr	w0, [x29, #24]	// w0 = 3
  400698:	51000401 	sub	w1, w0, #0x1	// w1 = 2 - 1 = 2
  40069c:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  4006a0:	9100c000 	add	x0, x0, #0x30	// x0 = 0x411030
  4006a4:	93407c21 	sxtw	x1, w1		
  4006a8:	b8617801 	ldr	w1, [x0, x1, lsl #2]	// w1 = [0x411030 + 2<<2]
  4006ac:	90000000 	adrp	x0, 400000 <_init-0x480>
  4006b0:	9128a000 	add	x0, x0, #0xa28
  4006b4:	2a0103e3 	mov	w3, w1
  4006b8:	b9401ba2 	ldr	w2, [x29, #24]
  4006bc:	52800281 	mov	w1, #0x14                  	// #20
  4006c0:	97ffff8c 	bl	4004f0 <printf@plt>	// printf("%d %d\n", 20, 3);
  4006c4:	b9401fa0 	ldr	w0, [x29, #28]	// w0 = i
  4006c8:	11000400 	add	w0, w0, #0x1	// i++
  4006cc:	b9001fa0 	str	w0, [x29, #28]	// [x29+28]=i
  4006d0:	b9401fa0 	ldr	w0, [x29, #28]
  4006d4:	7100281f 	cmp	w0, #0xa
  4006d8:	54fff9cd 	b.le	400610 <main_add+0x14>*/
	for (i = 0; i <= 10; i++) {
		j++;
		printf(" %d %d %d\n", 0x10, j, a[j-1]);
		j++;
		printf(" %d %d %d\n", 0x10, j, a[j-1]);
		j++;
		printf(" %d %d %d\n", 0x10, j, a[j-1]);
	}

  /*4006dc:	52800000 	mov	w0, #0x0                   	// #0
  4006e0:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4006e4:	d65f03c0 	ret*/
	return 0;
}

void add_main()
{
  /*4006e8:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  4006ec:	910003fd 	mov	x29, sp
  4006f0:	b9001bbf 	str	wzr, [x29, #24]
  4006f4:	b9001fbf 	str	wzr, [x29, #28]*/
	int j = 0;
	int i = 0;

	for(i = 0; i <= 10; i++) 
	{
  /*4006f8:	14000031 	b	4007bc <add_main+0xd4>
  4006fc:	b9401ba0 	ldr	w0, [x29, #24]	// w0 = j = 0
  400700:	11000400 	add	w0, w0, #0x1	// w0 = j+1
  400704:	b9001ba0 	str	w0, [x29, #24]	// [x29+24] = 1 */

  /*400610:	b9401ba0 	ldr	w0, [x29, #24]	// w0 = j
  400614:	11000400 	add	w0, w0, #0x1	// j++
  400618:	b9001ba0 	str	w0, [x29, #24]	// [x29+24] = 1*/
	j++;
  /*400708:	b9401ba0 	ldr	w0, [x29, #24]	// w0 = 1
  40070c:	51000401 	sub	w1, w0, #0x1	// w1 = 1-1 = 0
  400710:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400714:	9100c000 	add	x0, x0, #0x30	// x0 = 411030
  400718:	93407c21 	sxtw	x1, w1		// x1 = 1
  40071c:	b8617801 	ldr	w1, [x0, x1, lsl #2]	// w1 = [411030+1<<2]
  400720:	90000000 	adrp	x0, 400000 <_init-0x480>
  400724:	9128a000 	add	x0, x0, #0xa28	// x0 = 400a28
  400728:	2a0103e3 	mov	w3, w1			// w3 = [411030+1<<2]
  40072c:	b9401ba2 	ldr	w2, [x29, #24]	// w2 = 1
  400730:	528008c1 	mov	w1, #0x46                  	// #70
  400734:	97ffff6f 	bl	4004f0 <printf@plt>	*/
	printf("%d %d %d\n", 0x46, j, a[j-1]);

  /*400738:	b9401ba0 	ldr	w0, [x29, #24]
  40073c:	11000400 	add	w0, w0, #0x1
  400740:	b9001ba0 	str	w0, [x29, #24]*/
	j++;
  /*400744:	b9401ba0 	ldr	w0, [x29, #24]
  400748:	51000401 	sub	w1, w0, #0x1
  40074c:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400750:	9100c000 	add	x0, x0, #0x30
  400754:	93407c21 	sxtw	x1, w1
  400758:	b8617801 	ldr	w1, [x0, x1, lsl #2]
  40075c:	90000000 	adrp	x0, 400000 <_init-0x480>
  400760:	9128a000 	add	x0, x0, #0xa28
  400764:	2a0103e3 	mov	w3, w1
  400768:	b9401ba2 	ldr	w2, [x29, #24]
  40076c:	52800901 	mov	w1, #0x48                  	// #72
  400770:	97ffff60 	bl	4004f0 <printf@plt>*/
	printf("%d %d %d\n", 0x48, j, a[j-1]);

  /*400774:	b9401ba0 	ldr	w0, [x29, #24]
  400778:	11000400 	add	w0, w0, #0x1
  40077c:	b9001ba0 	str	w0, [x29, #24] */
	j++;

  /*400780:	b9401ba0 	ldr	w0, [x29, #24]
  400784:	51000401 	sub	w1, w0, #0x1
  400788:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  40078c:	9100c000 	add	x0, x0, #0x30
  400790:	93407c21 	sxtw	x1, w1
  400794:	b8617801 	ldr	w1, [x0, x1, lsl #2]
  400798:	90000000 	adrp	x0, 400000 <_init-0x480>
  40079c:	9128a000 	add	x0, x0, #0xa28
  4007a0:	2a0103e3 	mov	w3, w1
  4007a4:	b9401ba2 	ldr	w2, [x29, #24]
  4007a8:	52800941 	mov	w1, #0x4a                  	// #74
  4007ac:	97ffff51 	bl	4004f0 <printf@plt>*/
	printf("%d %d %d\n", 0x4a, j, a[j-1]);

  /*4007b0:	b9401fa0 	ldr	w0, [x29, #28]
  4007b4:	11000400 	add	w0, w0, #0x1
  4007b8:	b9001fa0 	str	w0, [x29, #28]
  4007bc:	b9401fa0 	ldr	w0, [x29, #28]
  4007c0:	7100281f 	cmp	w0, #0xa
  4007c4:	54fff9cd 	b.le	4006fc <add_main+0x14>*/

	}
  
  /*4007c8:	52800000 	mov	w0, #0x0                   	// #0
  4007cc:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4007d0:	d65f03c0 	ret*/
}

int array_main()
{
  /*4007d4:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  4007d8:	910003fd 	mov	x29, sp
  4007dc:	b9001bbf 	str	wzr, [x29, #24]
  4007e0:	b9001fbf 	str	wzr, [x29, #28]*/
	int j = 0;
	int i = 0;

	for (i = 0; i <= 10; i++) {
  /*4007e4:	1400002b 	b	400890 <array_main+0xbc>
  4007e8:	b9401ba0 	ldr	w0, [x29, #24]
  4007ec:	11000401 	add	w1, w0, #0x1
  4007f0:	b9001ba1 	str	w1, [x29, #24]*/
	  j++;

  /*4007f4:	b0000081 	adrp	x1, 411000 <__libc_start_main@GLIBC_2.17>
  4007f8:	9100c021 	add	x1, x1, #0x30
  4007fc:	93407c00 	sxtw	x0, w0
  400800:	b8607821 	ldr	w1, [x1, x0, lsl #2]
  400804:	90000000 	adrp	x0, 400000 <_init-0x480>
  400808:	9128a000 	add	x0, x0, #0xa28
  40080c:	2a0103e3 	mov	w3, w1
  400810:	b9401ba2 	ldr	w2, [x29, #24]
  400814:	52800f61 	mov	w1, #0x7b                  	// #123
  400818:	97ffff36 	bl	4004f0 <printf@plt>*/
	  printf("%d %d %d\n", 0x7b, j, a[j]);

  /*40081c:	b9401ba0 	ldr	w0, [x29, #24]
  400820:	11000401 	add	w1, w0, #0x1
  400824:	b9001ba1 	str	w1, [x29, #24]*/
	  j++;

  /*400828:	b0000081 	adrp	x1, 411000 <__libc_start_main@GLIBC_2.17>
  40082c:	9100c021 	add	x1, x1, #0x30
  400830:	93407c00 	sxtw	x0, w0
  400834:	b8607821 	ldr	w1, [x1, x0, lsl #2]
  400838:	90000000 	adrp	x0, 400000 <_init-0x480>
  40083c:	9128a000 	add	x0, x0, #0xa28
  400840:	2a0103e3 	mov	w3, w1
  400844:	b9401ba2 	ldr	w2, [x29, #24]
  400848:	52800f81 	mov	w1, #0x7c                  	// #124
  40084c:	97ffff29 	bl	4004f0 <printf@plt>*/
	  printf("%d %d %d\n", 0x7c, j, a[j]);

  /*400850:	b9401ba0 	ldr	w0, [x29, #24]
  400854:	11000401 	add	w1, w0, #0x1
  400858:	b9001ba1 	str	w1, [x29, #24]*/
	  j++;

  /*40085c:	b0000081 	adrp	x1, 411000 <__libc_start_main@GLIBC_2.17>
  400860:	9100c021 	add	x1, x1, #0x30
  400864:	93407c00 	sxtw	x0, w0
  400868:	b8607821 	ldr	w1, [x1, x0, lsl #2]
  40086c:	90000000 	adrp	x0, 400000 <_init-0x480>
  400870:	9128a000 	add	x0, x0, #0xa28
  400874:	2a0103e3 	mov	w3, w1
  400878:	b9401ba2 	ldr	w2, [x29, #24]
  40087c:	52800fa1 	mov	w1, #0x7d                  	// #125
  400880:	97ffff1c 	bl	4004f0 <printf@plt>*/
	  printf("%d %d %d\n", 0x7d, j, a[j]);

  /*400884:	b9401fa0 	ldr	w0, [x29, #28]
  400888:	11000400 	add	w0, w0, #0x1
  40088c:	b9001fa0 	str	w0, [x29, #28]
  400890:	b9401fa0 	ldr	w0, [x29, #28]
  400894:	7100281f 	cmp	w0, #0xa
  400898:	54fffa8d 	b.le	4007e8 <array_main+0x14>*/
	}

  /*40089c:	b9001bbf 	str	wzr, [x29, #24]
  4008a0:	b9001fbf 	str	wzr, [x29, #28]*/
	j = 0;
	i = 0;
	
	for (i = 0; i <= 10; i++) {
  /*4008a4:	14000028 	b	400944 <array_main+0x170>
  4008a8:	b9401ba0 	ldr	w0, [x29, #24]
  4008ac:	11000401 	add	w1, w0, #0x1 */
		j++;

  /*4008b0:	b9001ba1 	str	w1, [x29, #24]
  4008b4:	b0000081 	adrp	x1, 411000 <__libc_start_main@GLIBC_2.17>
  4008b8:	9100c021 	add	x1, x1, #0x30
  4008bc:	93407c00 	sxtw	x0, w0
  4008c0:	b8607821 	ldr	w1, [x1, x0, lsl #2]
  4008c4:	90000000 	adrp	x0, 400000 <_init-0x480>
  4008c8:	91294000 	add	x0, x0, #0xa50
  4008cc:	2a0103e2 	mov	w2, w1
  4008d0:	52801061 	mov	w1, #0x83                  	// #131
  4008d4:	97ffff07 	bl	4004f0 <printf@plt>*/
		printf("%d %d\n", 0x83, a[j]);

  /*4008d8:	b9401ba0 	ldr	w0, [x29, #24]
  4008dc:	11000401 	add	w1, w0, #0x1
  4008e0:	b9001ba1 	str	w1, [x29, #24]*/
		j++;

  /*4008e4:	b0000081 	adrp	x1, 411000 <__libc_start_main@GLIBC_2.17>
  4008e8:	9100c021 	add	x1, x1, #0x30
  4008ec:	93407c00 	sxtw	x0, w0
  4008f0:	b8607821 	ldr	w1, [x1, x0, lsl #2]
  4008f4:	90000000 	adrp	x0, 400000 <_init-0x480>
  4008f8:	91294000 	add	x0, x0, #0xa50
  4008fc:	2a0103e2 	mov	w2, w1
  400900:	52801081 	mov	w1, #0x84                  	// #132
  400904:	97fffefb 	bl	4004f0 <printf@plt>*/
		printf("%d %d\n", 0x84, a[j]);

  /*400908:	b9401ba0 	ldr	w0, [x29, #24]
  40090c:	11000401 	add	w1, w0, #0x1
  400910:	b9001ba1 	str	w1, [x29, #24]*/
		j++;

  /*400914:	b0000081 	adrp	x1, 411000 <__libc_start_main@GLIBC_2.17>
  400918:	9100c021 	add	x1, x1, #0x30
  40091c:	93407c00 	sxtw	x0, w0
  400920:	b8607821 	ldr	w1, [x1, x0, lsl #2]
  400924:	90000000 	adrp	x0, 400000 <_init-0x480>
  400928:	91294000 	add	x0, x0, #0xa50
  40092c:	2a0103e2 	mov	w2, w1
  400930:	528010a1 	mov	w1, #0x85                  	// #133
  400934:	97fffeef 	bl	4004f0 <printf@plt>*/
		printf("%d %d\n", 0x85, a[j]);

  /*400938:	b9401fa0 	ldr	w0, [x29, #28]
  40093c:	11000400 	add	w0, w0, #0x1
  400940:	b9001fa0 	str	w0, [x29, #28]
  400944:	b9401fa0 	ldr	w0, [x29, #28]
  400948:	7100281f 	cmp	w0, #0xa
  40094c:	54fffaed 	b.le	4008a8 <array_main+0xd4>*/
	}

  /*400950:	52800000 	mov	w0, #0x0                   	// #0
  400954:	a8c27bfd 	ldp	x29, x30, [sp], #32
  400958:	d65f03c0 	ret*/
	return 0;
}

int main()
{
  /*40095c:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  400960:	910003fd 	mov	x29, sp*/
  	array_main();

  /*400968:	52800000 	mov	w0, #0x0                   	// #0
  40096c:	a8c17bfd 	ldp	x29, x30, [sp], #16
  400970:	d65f03c0 	ret
  400974:	00000000 	.inst	0x00000000 ; undefined*/
	return 0;	
}

